package locations.actions;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.interceptor.ServletRequestAware;
import com.opensymphony.xwork2.ActionSupport;
import locations.dao.implement.PracticeTypeDAOHibernateJPA;


public class DeletePracticeTypeAction extends ActionSupport implements ServletRequestAware  {

	
	private static final long serialVersionUID = -8124967730231198191L;
	
	private HttpServletRequest request; 
	
	public String execute(){
		Long id = Long.parseLong(this.getRequest().getParameter("id"));
		PracticeTypeDAOHibernateJPA dao = new PracticeTypeDAOHibernateJPA();
		dao.delete(id);
		return SUCCESS;
	}

	public HttpServletRequest getRequest() {
		return request;
	}

	@Override
	public void setServletRequest(HttpServletRequest request) {
		this.request = request;
		
	}
	
}
